<template>	
<div class="wrapper">
    <swiper :options="swiperOption" indicator-dots="true"
          autoplay="true" interval="3000" duration="1000">
            <swiper-slide v-for="item of banner" :key="item.id" @click="choose">
                <swiper-item >
                    <image :src="item.imgUrl" class="swiper-img"/>
                </swiper-item >
            </swiper-slide>
    </swiper>
    </div>
</template>

<script>
    export default {
        data(){
        	return {
                swiperOption: {
                    pagination: '.swiper-pagination'
                },
        			banner:[{
                        id:"0001", 
                        imgUrl:'/static/images/01.jpg',
                    },{
                        id:"0002", 
                        imgUrl:'/static/images/02.jpg',
                    },{
                        id:"0003", 
                        imgUrl:'/static/images/03.jpg',
                    },{
                        id:"0004", 
                        imgUrl:'/static/images/04.jpg',
                        }]     
          
    }   
}  ,
  methods: {
        choose() {
         wx.showToast({
            title: '代完善',
            icon: 'success',
            duration: 2000
            })
        }  }  }       
</script>
<style lang="stylus" scoped>
  .wrapper
    overflow: hidden
    width: 100%
    height: 0
    padding-bottom:40%
    background: #eee
    .swiper-img
      width: 100%
      

</style>
